/*   Shotscreens
 *   Copyright (C) 2010, Vadim Zakondyrin (http://crystalnix.com)
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef SHOTSCREENS_H
#define SHOTSCREENS_H

#include "applicationwindowitem.h"
#include "globalshortcut.h"
#include "Interfaces/tray.h"
#include "texttodraw.h"

#include <QDialog>
#include <QKeySequence>
#include <QMessageBox>
#include <QTcpServer>

QT_BEGIN_NAMESPACE
class Fullscreenwidget;
class ScreenShotsEditor;
class FullscreenWidget;
class SettingsMenu;
QT_END_NAMESPACE

class ShotScreens : public QDialog
{
    Q_OBJECT

public:
    ShotScreens(QWidget *parent = 0);
    ~ShotScreens();

    bool IsRunned();
    Tray tray;
    void SetShortcutKey();

public slots:
    void takeScreenshot();
    void uploadData(QByteArray);
    void showTray();
    void hideTray();
    void ChangeAccount();
    void changeHotkey(QKeySequence);

private slots:
    void changeActivity();
    void openSettingsMenu();

private:
    QTcpServer *srv;

    GlobalShortcut shortcut;
    FullscreenWidget* fullscreenwidget;
    ScreenShotsEditor *screenshotsEditor;

    bool active;

    TextToDraw text_dialog;
    QMessageBox MessageBox;
    void initializationTray();

    SettingsMenu* settingsMenu;

private slots:
    void startEditor(QPixmap);
};

#endif // SHOTSCREENS_H
